package com.yznote.cloudesk.message.service;


import com.yznote.cloudesk.common.pojo.Message;
import com.yznote.cloudesk.common.pojo.Room;
import com.yznote.cloudesk.common.pojo.RoomUser;
import com.yznote.cloudesk.common.pojo.User;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.List;

public interface RoomService {
    Room creatRoom(Room room);
    List<Room> queryRoomList();

    Boolean joinRoom(Long roomId);

    List<Room> queryRoomListByName(String roomName);

    Boolean inviteUserToRoom(Long roomId, Long userId);

    List<Room> queryInvite();

    Boolean joinTheRoom(Long roomId);

    List<RoomUser> queryApply();

    List<RoomUser> queryApplyByRoomId(Long roomId);

    List<User> selectUsersInRoom(Long roomId);

    Boolean acceptRoom(Long roomId);

    List<Message> getOfflineMessage(Long roomId);

    List<Room> getInviteNotice();

    List<Room> getOwnerRoomList();

    Boolean rejectRoom(Long roomId);

    Integer getOfflineMessageCount(Long roomId);

    Message getLastMessage(Long roomId);

    List<Message> getMessages(Long roomId);

    Boolean pushLastTimestamp(LocalDateTime time,Long roomId);

    Boolean dismissRoom(Long roomId);

    void pushUserHeaders(MultipartFile mtf,Long roomId) throws Exception;

    void removeUser(Long otherUserId,Long roomId);

    void tryJoinRoomByRoomname(String roomName);

    void tryJoinRoomByRoomId(Long roomId);
}
